﻿@model IEnumerable<NewRen.Models.UserGroup>
@using NewRen.Models
@{
    ViewBag.Title = "找牛棚";
    Layout = "~/Views/Shared/_Layout.cshtml";
    List<Industry> Industries = ViewBag.Industries as List<Industry>;
    List<City> Cities = ViewBag.City as List<City>;
}
<script>
    $("#nav_usergroup").attr("class", "item_selected");
</script>
<div class="banner">
    <div class="container">
        <div class="logo">
            <img src="~/Images/logo.png" width="200" height="76">
        </div>
        <div class="search-block" style="margin-top: 10px;">
            <form class="search" action="/Search/Index">
                <input type="text" placeholder="请输入要检索的牛人、牛棚" name="query" class="search-query" />
                <input type="submit" value="搜索" class="search-submit" />
            </form>
        </div>
        <div class="clr"></div>
    </div>
</div>

<div class="container">
    <div class="filter-box">
        <form action="/" method="post">
            <div class="fieldset" style="border-top:none;">
                <h4 class="legend">城市</h4>
                <div class="items">
                    <input type="hidden" id="city" value="@ViewBag.City" />
                    <a href="javascript:void(0)" class="pfbtn all @(ViewBag.City==""?"seled":"")">全部</a>
                    @foreach (var item in ViewBag.Cities)
                    {
                        <a href="javascript:void(0)" class="pfbtn @(ViewBag.City==@item.CityName?"seled":"")">@item.CityName</a>
                    }
                    @if (ViewBag.CitiesMore.Count > 0)
                    {
                        <a href="javascript:void(0)" id="btnCityMore" class="items-more">更多>></a>
                        foreach (var item in ViewBag.CitiesMore)
                        {
                            <a href="javascript:void(0)" class="city_items pfbtn @(ViewBag.City==item.CityName?"seled":"")" style="display:none">@item.CityName</a>
                        }
                    }
                </div>
            </div>

            <div class="fieldset">
                <h4 class="legend">行业</h4>
                <div class="items">
                    <input type="hidden" id="industry" value="@ViewBag.Industry" />
                    <a href="javascript:void(0)" class="pfbtn all @(ViewBag.Industry==""?"seled":"")">全部</a>
                    @foreach (var item in ViewBag.Industries)
                    {
                        <a href="javascript:void(0)" class="pfbtn @(ViewBag.Industry==item.IndustryName?"seled":"")">@item.IndustryName</a>
                    }
                    @if (ViewBag.IndustriesMore.Count > 0)
                    {
                        <a href="javascript:void(0)" id="btnIndustryMore" class="items-more">更多>></a>
                        foreach (var item in ViewBag.IndustriesMore)
                        {
                            <a href="javascript:void(0)" class="industry_items pfbtn @(ViewBag.Industry==item.IndustryName?"seled":"")" style="display:none">@item.IndustryName</a>
                        }
                    }
                </div>
            </div>
        </form>
    </div>
</div>


<div class="container">
    <div class="list-box">
        @if (Model.Count() > 0)
        {
            <div class="clearfix">
                @foreach (var item in Model)
                {
                    <dl class="fl">
                        <dt>
                            <a href="/UserGroup/UserGroupShow/@item.ID" target="_blank">
                                @if (item.Picture != null)
                                {
                                    <img src="/UserGroup/ShowPicture/@item.ID" class="headPhoto"/>
                                }
                                else
                                {
                                    <img src="~/Images/userphoto.png" class="headPhoto"/>
                                }
                            </a>
                        </dt>
                        <dd>
                            <ul>
                                <li class="name">牛棚名：<a href="/UserGroup/UserGroupShow/@item.ID" target="_blank"><em class="highliht">@item.GroupName</em></a></li>
                                <li>行业：@item.Industry</li>
                                <li>城市：@item.City</li>
                                <li>
                                    介绍：@item.Description
                                </li>
                                <li>点赞：@item.Ups</li>
                            </ul>
                        </dd>
                    </dl>
                }
            </div>
            @Html.MakePager()
        }
        else
        {
            <div>暂无数据~~~</div>
        }
    </div>
</div>